package com.example.mapper;

import com.example.entity.Written;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface WrittenMapper {

    List<Written> selectAll(Written written);

    void insert(Written written);

    void updateById(Written written);

    @Delete("delete from `written` where id = #{id}")
    void deleteById(Integer id);

    List<Written> selectByStatus(Written written);

    @Select("select * from `written` where id = #{id}")
    Written selectById(Integer id);
}